package chtp02;

import java.util.Arrays;
import java.util.Scanner;

public class Main3 {
	public static void main(String[] args) {
		
	Scanner sc = new Scanner(System.in);
	
	while(true) {
		int n=sc.nextInt();
		String [][] str = new String [n][];
		for(int i=0;i<n;i++) {
			str[i]=new String[i+1];
		}
		for(int i=1;i<=n;i++) {
			for(int j=1;j<=i;j++) {
				String a=i+"";
				String b=j+"";
				String c=i*j+"";
				str[i-1][j-1]=a+"*"+b+"="+c;
				if(i==j)
					System.out.printf("%s\n",str[i-1][j-1]);
				else 
					System.out.printf("%-7s",str[i-1][j-1]);
			}
		}
		System.out.println(Arrays.deepToString(str));
			
		
	}
		
}}

